From 8c2e5ea7bf9fc407cf9f840578cf8cc0a6127e7d Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 22 Aug 2006 15:39:25 +0000 Subject: [PATCH] Paul Fox improves stability of sort filter. --- gpsbabel/sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/sort.c b/gpsbabel/sort.c index 0c14e2c57..b7e579431 100644 --- a/gpsbabel/sort.c +++ b/gpsbabel/sort.c @@ -55,10 +55,10 @@ sort_comp(const void * a, const void * b) const waypoint *x2 = *(waypoint **)b; switch (sort_mode) { - case sm_gcid: return x1->gc_data.id > x2->gc_data.id; + case sm_gcid: return x1->gc_data.id - x2->gc_data.id; case sm_shortname: return strcmp (x1->shortname, x2->shortname); case sm_description: return strcmp (x1->description, x2->description); - case sm_time: return x1->creation_time > x2->creation_time; + case sm_time: return x1->creation_time - x2->creation_time; default: abort(); return 0; /* Internal caller error. */ } } -- 2.30.2